<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import ChargeWayEnum from '@/feature/oms/infra/constants/ChargeWayEnum'
import CURDTable from '@/framework/components/table/CURDTable'
import { orderCommentApi } from '@/feature/oms/infra/api/orderCommentApi'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        showSelection: false,
        requestApi: orderCommentApi,
        columns: [
          {
            label: '订单号',
            width: 180,
            searchable: true,
            prop: 'orderDetail.orderNo',
            searchProp: 'orderNo'
          }, {
            label: '圈主姓名',
            width: 180,
            searchable: true,
            prop: 'orderDetail.anchor.userName',
            searchProp: 'userName'
          }, {
            label: '圈主头像',
            width: 180,
            type: ColumnType.IMAGE,
            searchable: false,
            prop: 'orderDetail.anchor.headImg'
          },
          {
            label: '产品名称',
            width: 100,
            prop: 'orderDetail.productTitle'
          },
          {
            label: '收费方式',
            width: 100,
            prop: 'orderDetail.chargeWay',
            tagMode: false,
            type: ColumnType.RADIO,
            options: ChargeWayEnum
          },
          {
            width: 120,
            label: '订单金额',
            prop: 'orderDetail.amount'
          },
          {
            width: 120,
            label: '平均分',
            prop: 'avgScore'
          },
          {
            width: 120,
            label: '态度评分',
            prop: 'serviceAttitudeScore'
          }, {
            width: 120,
            label: '专业评分',
            prop: 'serviceMajorScore'
          }, {
            width: 120,
            label: '描述评分',
            prop: 'serviceDescScore'
          },
          {
            label: '评论时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

